<?php

// every page needs to start with these basic things 

// I'm using a separate config file. so pull in those values 
require("config.inc.php"); 

// pull in the file with the database class 
require("Database.class.php"); 

// create the $db object 
$db = new Database(DB_SERVER, DB_USER, DB_PASS, DB_DATABASE); 

// connect to the server 
$db->connect(); 

$sql = "select * from User";

$rows = $db->query($sql);

while ($record = $db->fetch_array($rows)) {
    echo "<tr><td>$record[passwd]</td>
          <td>$record[userName]</td></tr>";
}

$db->close();

?>